package org.dromara.demo1.dubbo;

import lombok.RequiredArgsConstructor;
import org.apache.dubbo.config.annotation.DubboService;
import org.dromara.common.core.utils.MapstructUtils;
import org.dromara.demo1.api.RemoteDemo1TestOrderService;
import org.dromara.demo1.api.domain.bo.RemoteTestOrderBo;
import org.dromara.demo1.domain.bo.TestOrderBo;
import org.dromara.demo1.service.ITestOrderService;
import org.springframework.stereotype.Service;

/**
 * @author: gxp
 * @desc: todo
 * @create: 2024-09-29 09:05
 **/
@RequiredArgsConstructor
@Service
@DubboService
public class RemoteTestOrderServiceImpl implements RemoteDemo1TestOrderService {
    private final ITestOrderService testOrderService;
    @Override
    public void saveTestOrder(RemoteTestOrderBo bo) {
        TestOrderBo testOrderBo = MapstructUtils.convert(bo, TestOrderBo.class);
        testOrderService.insertByBo(testOrderBo);

    }
}
